package com.bilgeadam.interfaces.program;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

/**
 *
 * @author Bora SAYINER
 * @since Dec 27, 2014 1:02:14 PM
 * @version 1.0
 */
public class Driver {

	public static void main(String[] args) {
		List<Student> students = new ArrayList<Student>();
		students.add(new Student(1, "Önder", "ŞAHİN", 25));
		students.add(new Student(2, "Emre", "ÇELEBİ", 21));
		students.add(new Student(3, "Merve", "ÇİLİNGİROĞLU", 24));
		students.add(new Student(4, "Bahar", "ARITÜRK", 26));
		System.out.println("##### BEFORE #####");
		for (Student student : students) {
			System.out.println(student);
		}
		System.out.println("##### AFTER #####");
		Collections.sort(students);
		for (Student student : students) {
			System.out.println(student);
		}
		Student min = Collections.min(students);
		Student max = Collections.max(students);
		System.out.println("Min: " + min);
		System.out.println("Max: " + max);
	}
}
